#include<iostream>
#include<deque>
using namespace std;
deque<int>dq;
int n, k;
int ft, bk;

int main()
{
	cin >> n >> k;
	int cnt = 0;
	for (int i = 1; i <= n; ++i)
	{
		int x; cin >> x;
		dq.push_back(x);
	}

	ft = dq.front(), bk = dq.back();
	while (ft <= k && !dq.empty())
	{
		cnt++;
		dq.pop_front();
		if (!dq.empty()) ft = dq.front();
	}
	while (bk <= k && !dq.empty())
	{
		cnt++;
		dq.pop_back();
		if (!dq.empty()) bk = dq.back();
	}
	cout << cnt << '\n';

	return 0;
}